home *** CD-ROM | disk | FTP | other *** search
/ MacHack 2000 / MacHack 2000.toast / pc / The Hacks / Softshoe / Lisa's Mac Parts / Broadcaster / Broadcaster.cp next >
Text File  |  2000-06-23  |  352b  |  18 lines

  1. // Broadcaster.cp
  2.  
  3. #ifndef Broadcaster_h
  4. #include "Broadcaster.h"
  5. #endif
  6. #ifndef BroadcastLoop_h
  7. #include "BroadcastLoop.h"
  8. #endif
  9.  
  10. template < class Protocol >
  11. void Broadcaster<Protocol>::Send( void (Protocol::*message)() )
  12.   {
  13.     for ( BroadcastLoop<Protocol> receiver( *this );
  14.             receiver.Unfinished();
  15.             receiver++ )
  16.         ((*receiver).*message)();
  17.   }
  18.